//@author A0101119Y
#ifndef DATETIME_H
#define DATETIME_H

#include <iostream>
#include <cstdio>
#include <ctime>
#include <string>
#include "Const.h"

namespace Twentyfifth {
	class DateTime {
	protected:
		int year;
		int month;
		int day;
		int hour;
		int minute;
		int second;
	public:
		DateTime();
		DateTime(int, int);
		DateTime(int, int, int);
		DateTime(int, int, int, int, int);
		bool operator==(const DateTime& rhs) const;
		bool operator!=(const DateTime& rhs) const;
		bool operator< (const DateTime& rhs) const;
		bool operator> (const DateTime& rhs) const;
		bool operator<=(const DateTime& rhs) const;
		bool operator>=(const DateTime& rhs) const;
		std::string toString();
		void print();
		const int getYear() const;
		const int getMonth() const;
		const int getDay() const;
		const int getHour() const;
		const int getMinute() const;
		const int getSecond() const;
		void setYear(int);
		void setMonth(int);
		void setDay(int);
		void setHour(int);
		void setMinute(int);
		void setSecond(int);
		bool isBlankDate();
		bool isBlankTime();

		bool isValidDate(int, int, int);
		bool isValidDate();
		bool isLeapYear(int);
		bool isValidTime(int, int, int);
		bool isValidTime();
		void setToNow();
		void offset(int secondsOffset);
		__time64_t getUnixEpochTime();
	};
}

#endif